home *** CD-ROM | disk | FTP | other *** search
- function initializePopUpFrame(sideNav, movies, title)
- {
- parent.loadPopUpTitle(title);
- this.scroller.setStyleProperty("background",10053375);
- this.scroller.setScrollContent("dummy");
- parent.loadSideNav(sideNav,movies,this.scroller.getScrollContent());
- this.scroller.refreshPane();
- }
- function loadSideNav(topics, movieNames, container)
- {
- var tempwc = null;
- var tempText = null;
- var i = 0;
- while(i < topics.length)
- {
- container.createEmptyMovieClip("wordClip" + i,i + 100);
- tempwc = container["wordClip" + i];
- tempwc.createTextField("content",10,19.4,73.7,118,0);
- tempText = tempwc.content;
- if(topics[i].indexOf("ETAPA") != -1)
- {
- tempText.embedFonts = true;
- tempText.setNewTextFormat(parent.tfEtapa);
- tempText.autoSize = true;
- tempText.wordWrap = true;
- tempText.selectable = false;
- }
- else
- {
- tempText.embedFonts = true;
- tempText.setNewTextFormat(parent.tf);
- tempText.autoSize = true;
- tempText.wordWrap = true;
- }
- textHeight = tempText._height;
- tempText.text = topics[i];
- if(i == 0)
- {
- tempwc._x = 0;
- tempwc._y = 0;
- }
- else
- {
- tempLastText = container["wordClip" + (i - 1)];
- tempwc._x = 0;
- tempwc._y = tempLastText._y + tempLastText._height + 10;
- }
- tempwc.clip = {};
- tempwc.clip.movieName = movieNames[i];
- tempwc.clip.colorOver = 6697880;
- tempwc.clip.colorOut = 16777215;
- if(topics[i].indexOf("ETAPA") == -1)
- {
- tempwc.onRelease = function()
- {
- trace(this._name + " clicked: " + this.clip.movieName);
- parent.content.loadMovie(this.clip.movieName);
- this.enabled = false;
- parent.lastClicked.enabled = true;
- parent.lastClicked.onRollOut();
- parent.lastClicked = this;
- };
- tempwc.onRollOver = function()
- {
- var clr = new Color(this);
- clr.setRGB(this.clip.colorOver);
- };
- tempwc.onRollOut = function()
- {
- var clr = new Color(this);
- clr.setRGB(this.clip.colorOut);
- };
- }
- if(topics[0].indexOf("ETAPA") != -1 && i == 1)
- {
- tempwc.onRollOver();
- tempwc.enabled = false;
- parent.lastClicked = tempwc;
- parent.loadPopUpContent(tempwc.clip.movieName);
- }
- else if(i == 0)
- {
- tempwc.onRollOver();
- tempwc.enabled = false;
- parent.lastClicked = tempwc;
- parent.loadPopUpContent(tempwc.clip.movieName);
- }
- i++;
- }
- }
- function loadPopUpTitle(titleText)
- {
- parent.createTextField("title",2,13,18,300,20);
- title.text = titleText;
- title.selectable = false;
- title.embedFonts = true;
- title.setTextFormat(parent.tf);
- }
- function loadPopUpContent(movieName)
- {
- parent.createEmptyMovieClip("content",1);
- if(movieName == "glossary.swf")
- {
- content._x = 150;
- content._y = 41;
- }
- else
- {
- content._x = 155;
- content._y = 41;
- }
- content.loadMovie(movieName);
- }
- stop();
- tf = new TextFormat();
- tf.font = "Myriad";
- tf.color = 16777215;
- tf.size = 13;
- tfEtapa = new TextFormat();
- tfEtapa.font = "Myriad";
- tfEtapa.color = 16763904;
- tfEtapa.size = 11;
- var lastClicked;
- parent = this;
- this.modalBlocker.hitArea = this;
- this.modalBlocker.onPress = function()
- {
- };
- this.modalBlocker.useHandCursor = false;
- close.onRollOver = function()
- {
- this.gotoAndStop("rollOver");
- };
- close.onRollOut = function()
- {
- this.gotoAndStop("rollOut");
- };
- close.onReleaseOutside = function()
- {
- this.gotoAndStop("rollOut");
- };
- close.onRelease = function()
- {
- parent.unloadMovie();
- _root.enableBottomNav();
- };
- dragBar.useHandCursor = false;
- dragBar.onPress = function()
- {
- this._parent.startDrag();
- dragBar.onMouseMove = this.onMouseMoveFunc;
- };
- dragBar.onRelease = function()
- {
- this._parent.stopDrag();
- dragBar.onMouseMove = null;
- };
- dragBar.onMouseMoveFunc = function()
- {
- updateAfterEvent();
- };
-